<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
<xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
<xsl:template match='nbsp' name='nbsp'>
<xsl:text disable-output-escaping='yes'>&amp;nbsp;</xsl:text>
</xsl:template>

<xsl:template match="onlineusers">
  
  <TABLE class="b10b" cellSpacing="0" cellPadding="0"  border="0" width="100%">
	<TBODY>
		<TR> 
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-tl.gif" width="8" border="0"/></TD>
			<TD width="100%" colspan="6" background="/imgs/pvts/box-t-back.gif" bgcolor="white"></TD>
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-tr.gif" width="8" border="0"/></TD>
		</TR>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="100%" colspan="6" align="center" style="padding:2px; padding-bottom:12px; " bgcolor="white" class="body">
<xsl:choose>
<xsl:when test='@totOnline="1"'>
<b><a href="/stats/publicSummary.aspx"><xsl:value-of select="@totOnline"/> utente online</a></b>
</xsl:when>
<xsl:otherwise>
<b><a href="/stats/publicSummary.aspx"><xsl:value-of select="@totOnline"/> utenti online </a></b>
</xsl:otherwise>
</xsl:choose>
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>

<xsl:choose>
<xsl:when test='count(freak/user[(floor( xmldatacache/extension/@uStatus div 32 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 16 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 4 ) mod 2)])'>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="100%" colspan="6" align="center" valign="middle" style="padding:2px; height:12px;" bgcolor="white" class="body8">
Staff
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>

<xsl:for-each select="freak/user[(floor( xmldatacache/extension/@uStatus div 4096 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 32 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 16 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 4 ) mod 2)]">
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="17px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@certified = 1'><a class="nick" href="/profileShow.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/cert.gif"/></a></xsl:when>
				<xsl:otherwise>
				&#160;
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="28px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@cg &gt; 0'><a class="nick" href="/userinfo/latest.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/pics.gif"/></a></xsl:when>
				<xsl:when test='string-length(xmldatacache/extension/@thumb) &gt; 0'><a href="/profileShow.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/foto.gif"/></a></xsl:when>
				<xsl:otherwise>
				&#160;
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="21px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
        <xsl:choose>
				<xsl:when test='xmldatacache/extension/@cb &gt; 0'><a class="nick" href="/userinfo/blog.aspx?userid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/blog.gif"/></a></xsl:when>
				<xsl:otherwise>
				<img border="0" style="width:21px; margin-left:2px;" src="/imgs/spacer.gif"/>
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="1%" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26"'><img src="/imgs/male.gif"/></xsl:when>
				<xsl:when test='xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27"'><img src="/imgs/female.gif"/></xsl:when>
				</xsl:choose>
			</TD>
			<TD width="50%" align="left" valign="middle" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
					<xsl:when test='@buddy=@userid'>
						<!-- se e' nella lista amichetti -->
						<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
						<b><xsl:value-of select="@nick"/></b>
						</a>
					</xsl:when>
					<xsl:otherwise>
						<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
						<xsl:value-of select="@nick"/>
						</a>
					</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="50%" align="center" valign="middle" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<nobr><xsl:value-of select="@city"/></nobr>
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
</xsl:for-each>

<xsl:choose>
<xsl:when test='count(freak/user[(floor( xmldatacache/extension/@uStatus div 32 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 16 ) mod 2) or (floor( xmldatacache/extension/@uStatus div 4 ) mod 2)])'>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="100%" colspan="6" align="center" valign="middle" style="padding:2px; height:12px; border-top: 1px solid #999999;" bgcolor="white" class="body8">
			&#160;
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>

<xsl:choose>
<xsl:when test='count(freak/user[0= (floor( xmldatacache/extension/@uStatus div 32 ) mod 2) and 0= (floor( xmldatacache/extension/@uStatus div 16 ) mod 2) and 0= (floor( xmldatacache/extension/@uStatus div 4 ) mod 2)])'>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="100%" colspan="6" align="center" valign="middle" style="padding:2px; height:12px;" bgcolor="white" class="body8">
Utenti
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>

<xsl:for-each select="freak/user[0= (floor( xmldatacache/extension/@uStatus div 32 ) mod 2) and 0= (floor( xmldatacache/extension/@uStatus div 16 ) mod 2) and 0= (floor( xmldatacache/extension/@uStatus div 4 ) mod 2)]">
  <xsl:sort order="ascending" select="@city" data-type="text"/>
		<TR vAlign="top"> 
			<TD width="8" background="/imgs/pvts/box-l-back.gif" bgcolor="white"></TD>
			<TD width="17px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@certified = 1'><a class="nick" href="/profileShow.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/cert.gif"/></a></xsl:when>
				<xsl:otherwise>
				&#160;
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="28px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@cg &gt; 0'><a class="nick" href="/userinfo/latest.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/pics.gif"/></a></xsl:when>
				<xsl:when test='string-length(xmldatacache/extension/@thumb) &gt; 0'><a href="/profileShow.aspx?userGuid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/foto.gif"/></a></xsl:when>
				<xsl:otherwise>
				&#160;
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="21px" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
        <xsl:choose>
				<xsl:when test='xmldatacache/extension/@cb &gt; 0'><a class="nick" href="/userinfo/blog.aspx?userid={@userid}"><img border="0" style="margin-left:2px;" src="/imgs/blog.gif"/></a></xsl:when>
				<xsl:otherwise>
				<img border="0" style="width:21px; margin-left:2px;" src="/imgs/spacer.gif"/>
				</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="1%" align="center" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
				<xsl:when test='xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26"'><img src="/imgs/male.gif"/></xsl:when>
				<xsl:when test='xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27"'><img src="/imgs/female.gif"/></xsl:when>
				</xsl:choose>
			</TD>
			<TD width="50%" align="left" valign="middle" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<xsl:choose>
					<xsl:when test='@buddy=@userid'>
						<!-- se e' nella lista amichetti -->
						<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
						<b><xsl:value-of select="@nick"/></b>
						</a>
					</xsl:when>
					<xsl:otherwise>
						<xsl:choose>
						<xsl:when test='xmldatacache/extension/@sexid="24" or xmldatacache/extension/@sexid="26"'>
							<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
							<xsl:value-of select="@nick"/>
							</a>
						</xsl:when>
						<xsl:when test='xmldatacache/extension/@sexid="25" or xmldatacache/extension/@sexid="27"'>
							<a class="nick" href="/profileShow.aspx?userGuid={@userid}">
							<xsl:value-of select="@nick"/>
							</a>
						</xsl:when>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</TD>
			<TD width="50%" align="center" valign="middle" style="padding:2px; border-top: 1px solid #999999;" bgcolor="white" class="body">
				<nobr><xsl:value-of select="@city"/></nobr>&#160;
			</TD>
			<TD width="8" background="/imgs/pvts/box-r.gif" bgcolor="white"><IMG height="10" src="/imgs/pvts/box-r.gif" width="8" border="0"/></TD>
		</TR>
</xsl:for-each>

		<TR> 
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-bl.gif" width="8" border="0"/></TD>
			<TD width="100%" colspan="6" background="/imgs/pvts/box-b.gif" bgcolor="white"><IMG height="8" src="/imgs/pvts/box-b.gif" width="10" border="0"/></TD>
			<TD width="8"><IMG height="8" src="/imgs/pvts/box-br.gif" width="8" border="0"/></TD>
		</TR>
	</TBODY>
</TABLE>

</xsl:template>

</xsl:stylesheet>